/**
 * 路由
 * Created by freeman on 16-6-27.
 */

"use strict";

var path = require('path'),
article = require('./api/article'),
tag = require('./api/tag'),
comment = require('./api/comment'),
auth = require('./auth'),
search = require('./api/search');


module.exports = function (app) {

    app.use('/auth',auth);

    app.use('/users',require('./api/user'));

    app.use('/articles',article);

    app.use('/comment',comment);

    app.use('/tags',tag);

    app.use('/search', search);

    app.use('/test', function (req,res,next) {
        console.log(req.body);
        return res.json({status:'success',data:'台湾是中国不可分割的一部分.'});
    });
    app.use('/*', function (req,res,next) {
        return res.json({status:'success',data:'台湾是中国不可分割的一部分.'});
    })
};
